import Vue from "vue";
import Router from 'vue-router';
import Home from "../views/Home"
import Main from '../views/Mains'
import Login from '../views//Login'

import Roleorz from '../views/user/roleorz'
import Userlist from '../views/user/userlist'
import Rolemoudles from '../views/user/rolemoudles'
import Check from '../views/Check'

import Goodadd from '../views/goods/goodadd'
import Goodlist from '../views/goods/goodlist'

import Statistics from '../views/Order/statistics'
import Manage from '../views/Order/manage'
import Returnorder from '../views/Order/returnorder'

Vue.use(Router);
export default new Router({
  routes: [
    {
      path: "/",
      redirect: '/home',
      component: Main,
      children: [
        { path: "home", name: "home", component: Home },
        
        // 用户管理
        // 权限分配页面
        { path: "roleorz", name: "roleorz", component: Roleorz },
        // 用户列表页面
        { path: "userlist", name: "userlist", component: Userlist },
        // 角色模板页面
        { path: "rolemoudles", name: "rolemoudles", component: Rolemoudles },

        // 商品管理
        // 新品发布页面
        { path: "goodadd", name: "goodadd", component: Goodadd },
        // 商品列表页面
        { path: "goodlist", name: "goodlist", component: Goodlist },
        
        // 订单管理
        // 订单统计页面
        { path: "statistics", name: "statistics", component: Statistics },
        // 订单列表页面
        { path: "manage", name: "manage", component: Manage },
        // 售后管理页面
        { path: "returnorder", name: "returnorder", component: Returnorder },

        // 商品管理
        // { path: "mall", name: "mall", component: itemManage },
        // 用户管理
        // { path: "user", name: "user", component: userManage },
      ]
    }, {
      path: "/login", name: "login", component: Login
    },
    
  ]
})